﻿#ifndef DEPTCONTROLLER_H
#define DEPTCONTROLLER_H

#include <httpcontroller.h>
using namespace stefanfrings;

class DeptController : public HttpController
{
public:
    explicit DeptController(QObject *parent = nullptr);
    ~DeptController();
    void route(QString path, QString method, HttpRequest &request, HttpResponse &response) override;
private:
    void getList(HttpRequest &request, HttpResponse &response);
    void saveOne(HttpRequest &request, HttpResponse &response,uint64_t id=0);
    void deleteOne(uint64_t id, HttpResponse &response);
};

#endif // DEPTCONTROLLER_H
